<?php 
session_start();
if (@$_SESSION['auth'] <> "yes") 
{
header('Location: login.php');
exit(); 
} 
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Media Manager - Yes, I take requests</title>
<link rel="stylesheet" type="text/css" href="/quotation.css" />
<link rel="shortcut icon" href="../favicon.ico" />


</head>

<body>
<div id="centeredmenu">
 <ul>
      <li><a href="http://www.quotationaday.com/booktest.php">Home</a></li>
      <li><a href="http://www.quotationaday.com/bookreport.php">Reports</a></li>
      <li><a href="http://www.quotationaday.com/qa.php">Bugs & Features</a></li>
      <li><a href="http://www.quotationaday.com/requests.php" class="active">Requests</a></li>
      <li><a href="http://www.quotationaday.com/about.html">About</a></li>
   </ul>
</div>
<h1>
<img class="banner" height="120px" width="780px" alt="Quotation a Day" src="../sitebanner.png"/>
</h1>




<?php

//connect to database with connection page information

$con = require "connect.php";
if (!$con)
  {
  die('Could not connect to database: ' . mysql_error());
  } 

$type=$_POST['type'];
$details=$_POST['details'];
$user = $_SESSION['user'];

$sql_i_qa = mysql_query
(
"
INSERT INTO qa (type, details, user_id, userstamp, datestamp, creation_date)
VALUES
('$type','$details','$user',1,
 (
  SELECT CURDATE()
  )
 ,
 (
  SELECT CURDATE()
  )
 )
"
)
;

echo "<p>";

if (!$sql_i_qa)
{
echo "Request could not be submitted" . mysql_error();
}
else
{
echo "Request submitted";	
}
	
echo "</p>";	


?>


<p>
<br/>
<br/>
<a href="http://quotationaday.com/login.php"> Login </a> <br/>
<a href="http://quotationaday.com/booktest.php">Home</a> <br/>
<a href="http://quotationaday.com/logout.php"> Logout </a> <br/>
</p>

<p>Questions, comments, bug reports, edit requests? <br/>
Contact the <a href="mailto:admin@quotationaday.com?subject=Quotation%20a%20Day">Administrator</a></p>

</body>
</html>
